<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class OpenSocialRequest</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class OpenSocialRequest</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|													<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Represents an atomic OpenSocial operation that can be converted to either  a REST or RPC request.</p>
	<ul class="tags">
				<li><span class="field">abstract:</span> </li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_OpenSocialRequest.php.html">/OpenSocialRequest.php</a> (line <span class="field">36</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../OpenSocial/FetchPeopleRequest.html">FetchPeopleRequest</a></td>
					<td>
											Represents a request for multiple people.
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../OpenSocial/FetchAppDataRequest.html">FetchAppDataRequest</a></td>
					<td>
											Represents a request to get app data.
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../OpenSocial/UpdateAppDataRequest.html">UpdateAppDataRequest</a></td>
					<td>
											Represents a request to get app data.
										</td>
				</tr>
							</table>
		</div>
	</div>



	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																						
				<div class="method-definition">
											<span class="method-result">OpenSocialRequest</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$id</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getId" title="details" class="method-name">getId</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getRequestor" title="details" class="method-name">getRequestor</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../OpenSocial/OpenSocialHttpRequest.html">OpenSocialHttpRequest</a></span>
										<a href="#getRestRequest" title="details" class="method-name">getRestRequest</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$base_url</span> = <span class="var-default">&quot;&quot;</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getRpcBody" title="details" class="method-name">getRpcBody</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#processJsonResponse" title="details" class="method-name">processJsonResponse</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$response</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$protocol</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setRequestor" title="details" class="method-name">setRequestor</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setRestParams" title="details" class="method-name">setRestParams</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$method</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$data</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setRpcParams" title="details" class="method-name">setRpcParams</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$entity</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$operation</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">null</span>])
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">49</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">OpenSocialRequest</span>
		<span class="method-name">
			__construct
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$id</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$id</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../OpenSocial/FetchPeopleRequest.html#method__construct">FetchPeopleRequest::__construct()</a>
								: Constructor.
							</li>
					<li>
				<a href="../OpenSocial/FetchPersonRequest.html#method__construct">FetchPersonRequest::__construct()</a>
								: Constructor.
							</li>
					<li>
				<a href="../OpenSocial/FetchAppDataRequest.html#method__construct">FetchAppDataRequest::__construct()</a>
								: Constructor.
							</li>
					<li>
				<a href="../OpenSocial/UpdateAppDataRequest.html#method__construct">UpdateAppDataRequest::__construct()</a>
								: Constructor.
							</li>
				</ul>
	</div>
<a name="methodgetId" id="getId"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getId</span> (line <span class="line-number">110</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the string ID of this request.</p>
	<ul class="tags">
				<li><span class="field">return:</span> An ID tagging this request.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getId
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetRequestor" id="getRequestor"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getRequestor</span> (line <span class="line-number">102</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns this request's requestor, if set.</p>
	<ul class="tags">
				<li><span class="field">return:</span> The value passed to setRequestor().</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getRequestor
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetRestRequest" id="getRestRequest"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getRestRequest</span> (line <span class="line-number">121</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an OpenSocialHttpRequest object that may be sent to an  OpenSocialHttpLib object.</p>
	<ul class="tags">
				<li><span class="field">return:</span> A request object that is not signed.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../OpenSocial/OpenSocialHttpRequest.html">OpenSocialHttpRequest</a></span>
		<span class="method-name">
			getRestRequest
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$base_url</span> = <span class="var-default">&quot;&quot;</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$base_url</span><span class="var-description">: The REST base URL for a server.  Used to resolve      relative paths for this request.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetRpcBody" id="getRpcBody"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getRpcBody</span> (line <span class="line-number">142</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an object that is suitable for building an RPC request.</p>
	<ul class="tags">
				<li><span class="field">return:</span> An array with parameters corresponding with those needed      to perform this request as an RPC operation.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getRpcBody
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodprocessJsonResponse" id="processJsonResponse"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">processJsonResponse</span> (line <span class="line-number">159</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Abstract function that should parse a JSON object and return a native  library object.</p>
	<ul class="tags">
				<li><span class="field">return:</span> An initialized OpenSocial client library object.</li>
				<li><span class="field">abstract:</span> </li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			processJsonResponse
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$response</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$protocol</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$response</span><span class="var-description">: A response that has been JSON decoded.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$protocol</span><span class="var-description">: Either &quot;REST&quot; or &quot;RPC&quot; depending on the protocol      used in the request.</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../OpenSocial/FetchPeopleRequest.html#methodprocessJsonResponse">FetchPeopleRequest::processJsonResponse()</a>
								: Converts a json response to a collection of people.
							</li>
					<li>
				<a href="../OpenSocial/FetchPersonRequest.html#methodprocessJsonResponse">FetchPersonRequest::processJsonResponse()</a>
								: Converts a json response to a single person object.
							</li>
					<li>
				<a href="../OpenSocial/FetchAppDataRequest.html#methodprocessJsonResponse">FetchAppDataRequest::processJsonResponse()</a>
								: Converts a valid JSON response to an OpenSocialAppData object.
							</li>
					<li>
				<a href="../OpenSocial/UpdateAppDataRequest.html#methodprocessJsonResponse">UpdateAppDataRequest::processJsonResponse()</a>
								: Converts a valid JSON response to an OpenSocialAppData object.
							</li>
				</ul>
	</div>
<a name="methodsetRequestor" id="setRequestor"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setRequestor</span> (line <span class="line-number">93</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">For the two-legged OAuth case, some requests need a viewer context.  This  method assigns the appropriate VIEWER id to the xoauth_requestor_id  OAuth parameter.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setRequestor
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$id</span><span class="var-description">: ID of the VIEWER.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetRestParams" id="setRestParams"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setRestParams</span> (line <span class="line-number">67</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set parameters for this object to be converted to a REST request.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setRestParams
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$method</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$data</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$method</span><span class="var-description">: The HTTP method to use.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$url</span><span class="var-description">: The url to fetch.  This may be a relative URL from the      REST endpoint.</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$params</span><span class="var-description">: Additional querystring parameters to use in the      request.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$data</span><span class="var-description">: POST body data to be sent in the request.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetRpcParams" id="setRpcParams"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setRpcParams</span> (line <span class="line-number">81</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set parameters for this object to be converted to a RPC request body.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setRpcParams
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$entity</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$operation</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$entity</span><span class="var-description">: The RPC entity that this request operates on.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$operation</span><span class="var-description">: The operation to perform.</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$params</span><span class="var-description">: Additional querystring parameters to use in the      request.</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 17 Dec 2008 14:03:08 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
	</p>
	</div></body>
</html>